﻿<%@ Page Language="C#" MasterPageFile="~/Shared/MainPage.Master" AutoEventWireup="true"
    CodeBehind="WorkRegistList.aspx.cs" Inherits="Runda.CMS.Portal.ContractFollowUp.WorkRegistList" %>
<%@ Register Assembly="RadCalendar.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" runat="server">

    <script src="../Content/global.js" type="text/javascript"></script>

    <link href="../Content/global.css" rel="stylesheet" type="text/css" />
    <link href="../Content/Menu/Menu.css" rel="stylesheet" type="text/css" />
    <link href="../Content/Find/find.css" rel="stylesheet" type="text/css" />
    <link href="../Content/Grid/Grid.css" rel="stylesheet" type="text/css" />

    <script src="../Content/Grid/map_grid.js" type="text/javascript"></script>

    <link href="../Content/Pager.css" rel="stylesheet" type="text/css" />

   <script src="../Content/lookup/Lookup.js" type="text/javascript"></script>

    <link href="../Content/Form/form.css" rel="Stylesheet" type="text/css" />

    <script language="javascript" src="../Content/Detail.js"></script>

    <script language="javascript" src="../Content/util.js"></script>
    <script src="../Content/jquery-1.3.2.js" type="text/javascript"></script>
    
    <script type="text/javascript">
        function OpenEditRegister(id) {
            openMyWin('TaskRegisterBasic.aspx?RegisterID=' + id, 'RegisterInfo', 800, 600);
        }
   
    </script>
    <script type="text/javascript">

        function OnDelConfirm() {
            return confirm('删除后无法恢复数据，确定要删除吗?');
        }
</script> 

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphBody" runat="server">
    <div class="Container">
        <table id="appFind" class="find" cellspacing="0" cellpadding="0" border="0">
            <tbody>
                <tr height="23">
                    <td class="wizHead" colspan="7">
                        <table style="table-layout: fixed; font-size: 9pt" cellspacing="0" cellpadding="0"
                            width="100%" height="100%">
                            <colgroup>
                                <col>
                                <col width="60">
                                <col width="60">
                                <tr>
                                    <td style="color: #ffffff">
                                        <b>快速查询</b>
                                    </td>
                                    <td class="icMenu mnuRight" nowrap>
                                    </td>
                                </tr>
                        </table>
                    </td>
                </tr>
                <tr id="__appFind_trQuery" height="40">
                    <td class="wizBox1" colspan="7">
                        <table id="__appFind_tbQuery1" style="table-layout: fixed; font-size: 9pt" height="100%"
                            cellspacing="0" cellpadding="0" width="100%">
                            <tr>
                                <td align="right">
                                    客户名称或区域：
                                </td>
                                <td>
                                    <asp:TextBox ID="txtContractCodeBasic" runat="server" Width="100px" CssClass="input"></asp:TextBox>
                                </td>
                                <td align="right">
                                    仪器名称：
                                </td>
                                <td>
                                    <asp:TextBox ID="txtinstrumentName" runat="server" Width="100px" CssClass="input"></asp:TextBox>
                                </td>
                                <td align="right">
                                    序列号：
                                </td>
                                <td>
                                    <asp:TextBox ID="txtSerialNum" runat="server" Width="100px" CssClass="input"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                
                                <td align="right">
                                    工作类型：
                                </td>
                                <td>
                                    <asp:DropDownList runat="server" ID="TaskType">
                                    </asp:DropDownList>
                                </td>
                                
                                <td align="right">
                                    执行人/代理人：
                                </td>
                                <td>
                                    <table cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;">
                                        <tr>
                                            <td>
                                                <asp:TextBox ID="employeeName" runat="server"></asp:TextBox>
                                           </td>
                                            
                                        </tr>
                                    </table>
                                </td>
                                 <td align="right">
                                    工作状态 ：
                                </td>
                                <td>
                                    <asp:DropDownList ID="status" runat="server">
                                        <asp:ListItem Text="未完成" Value="0" Selected="True"></asp:ListItem>
                                        <asp:ListItem Text="已完成" Value="1"></asp:ListItem>
                                        <asp:ListItem Text="--不限--" Value=""></asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                              
                                <td align="right">
                                   开始日期 ：
                                </td>
                                <td>
                                 <rad:RadDateTimePicker ID="ExpectEndDateFrom" runat="server" Culture="Chinese (People's Republic of China)"
                                                                    Skin="WebBlue" Width="160px">
                                                                    <DateInput Skin="WebBlue">
                                                                    </DateInput>
                                                                    <Calendar  Skin="WebBlue">  
                                                                        <SpecialDays>  
                                                                            <rad:RadCalendarDay Date="" Repeatable="Today">  
                                                                                <ItemStyle CssClass="radCalToday_WebBlue" />  
                                                                            </rad:RadCalendarDay>  
                                                                        </SpecialDays>  
                                                                    </Calendar>  
                                                                </rad:RadDateTimePicker>
                                </td>
                                <td  align="right">
                                    截止日期：
                                </td>
                                <td>
                                     <rad:RadDateTimePicker ID="ExpectEndDateTo" runat="server" Culture="Chinese (People's Republic of China)"
                                                                    Skin="WebBlue" Width="160px">
                                                                    <DateInput Skin="WebBlue">
                                                                    </DateInput>
                                                                    <Calendar  Skin="WebBlue">  
                                                                        <SpecialDays>  
                                                                            <rad:RadCalendarDay Date="" Repeatable="Today">  
                                                                                <ItemStyle CssClass="radCalToday_WebBlue" />  
                                                                            </rad:RadCalendarDay>  
                                                                        </SpecialDays>  
                                                                    </Calendar>  
                                                                </rad:RadDateTimePicker>
                                </td>
                                <td align="right">是否系统派发：</td>
                                <td>
                                      <asp:DropDownList ID="listIsSystemAssign" runat="server">
                                      <asp:ListItem Text="--不限--" Value="-1"></asp:ListItem>
                                        <asp:ListItem Text="否" Value="0"></asp:ListItem>
                                        <asp:ListItem Text="是" Value="1"></asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td>
                                <asp:Button ID="btnSearchBasic" runat="server" Text="查找" CssClass="button" OnClick="btnSearch_Click" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <div class="Container">
        <table class="mnubar" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td style="padding-left: 5px" nowrap>
                        <b>工作注册列表</b>
                    </td>
                    <td style="padding-left: 5px">
                        <img src="../Content/Grid/separator.gif">
                    </td>
                    <td class="icMenu" nowrap>
                    </td>
                    <td class="icMenu mnuRight" nowrap>
                        <span class="menu" onclick="openMyFullWin('TaskRegisterBasic.aspx','ContractAdd');">
                            <img class="mnuBtn" src="../Content/Grid/New_16_blue.gif"><span class="mnuBtn">添加注册表</span></span>
                                                         
                    </td>
                </tr>
            </tbody>
        </table>
        <div style="border-bottom: #c2c2bf 1px solid; border-top: #969693 1px solid">
        </div>
        <asp:Repeater ID="RepeaterUsers" runat="server" OnItemCommand="RepeaterUsers_ItemCommand"
            OnItemDataBound="RepeaterUsers_ItemDataBound">
            <HeaderTemplate>
                <table id="grid" class="grid" cellspacing="0" cellpadding="0">
                    <tbody>
                        <tr class="header">
                            <td align="middle" style="width:260px">
                                <div>
                                    <div style="display: inline; float: left; height: auto; overflow: hidden; width: 96%;
                                        text-align: center;">
                                        客户名称</div>
                                    <div style="display: inline; float: right; height: auto; overflow: hidden;">
                                        <img src="../Content/Grid/bar_line.gif" border="0"></div>
                                </div>
                            </td>
                            <td align="middle"  style="width:60px">
                                <div>
                                    <div style="display: inline; float: left; height: auto; overflow: hidden; width: 96%;
                                        text-align: center;">
                                        区域</div>
                                    <div style="display: inline; float: right; height: auto; overflow: hidden;">
                                        <img src="../Content/Grid/bar_line.gif" border="0"></div>
                                </div>
                            </td>
                            <td align="middle" style="width:80px">
                                <div>
                                    <div style="display: inline; float: left; height: auto; overflow: hidden; width: 96%;
                                        text-align: center;">
                                        工作类型</div>
                                    <div style="display: inline; float: right; height: auto; overflow: hidden;">
                                        <img src="../Content/Grid/bar_line.gif" border="0"></div>
                                </div>
                            </td>
                            <td align="middle"  style="width:40px">
                                <div>
                                    <div style="display: inline; float: left; height: auto; overflow: hidden; width: 96%;
                                        text-align: center;">
                                        工作状态</div>
                                    <div style="display: inline; float: right; height: auto; overflow: hidden;">
                                        <img src="../Content/Grid/bar_line.gif" border="0"></div>
                                </div>
                            </td>
                            <td align="middle"  style="width:120px">
                                <div>
                                    <div style="display: inline; float: left; height: auto; overflow: hidden; width: 96%;
                                        text-align: center;">
                                       期望到达日期</div>
                                    <div style="display: inline; float: right; height: auto; overflow: hidden;">
                                        <img src="../Content/Grid/bar_line.gif" border="0"></div>
                                </div>
                            </td>
                            <td align="middle"  style="width:60px">
                                <div>
                                    <div style="display: inline; float: left; height: auto; overflow: hidden; width: 96%;
                                        text-align: center;">
                                        执行人</div>
                                    <div style="display: inline; float: right; height: auto; overflow: hidden;">
                                        <img src="../Content/Grid/bar_line.gif" border="0"></div>
                                </div>
                            </td>
                            <td align="middle" style="width:60px">
                                <div>
                                    <div style="display: inline; float: left; height: auto; overflow: hidden; width: 96%;
                                        text-align: center;">
                                        代理人</div>
                                    <div style="display: inline; float: right; height: auto; overflow: hidden;">
                                        <img src="../Content/Grid/bar_line.gif" border="0"></div>
                                </div>
                            </td>
                            <td align="middle" style="width:60px">
                                <div>
                                    <div style="display: inline; float: left; height: auto; overflow: hidden; width: 96%;
                                        text-align: center;">
                                        创建人</div>
                                    <div style="display: inline; float: right; height: auto; overflow: hidden;">
                                        <img src="../Content/Grid/bar_line.gif" border="0"></div>
                                </div>
                            </td>
                            <td align="middle"  style="width:190px">
                                <div>
                                    <div style="display: inline; float: left; height: auto; overflow: hidden; width: 96%;
                                        text-align: center;">
                                        仪器名称</div>
                                    <div style="display: inline; float: right; height: auto; overflow: hidden;">
                                        <img src="../Content/Grid/bar_line.gif" border="0"></div>
                                </div>
                            </td>
                            <td align="middle"  style="width:100px">
                                <div>
                                    <div style="display: inline; float: left; height: auto; overflow: hidden; width: 96%;
                                        text-align: center;">
                                        仪器序列号</div>
                                    <div style="display: inline; float: right; height: auto; overflow: hidden;">
                                        <img src="../Content/Grid/bar_line.gif" border="0"></div>
                                </div>
                            </td>
                            <td align="middle"  style="width:150px">
                                <div>
                                    <div style="display: inline; float: left; height: auto; overflow: hidden; width: 96%;
                                        text-align: center;">
                                        操作</div>
                                    <div style="display: inline; float: right; height: auto; overflow: hidden;">
                                        <img src="../Content/Grid/bar_line.gif" border="0"></div>
                                </div>
                            </td>
                            <td width="14px">
                                <asp:ImageButton ID="imgbtnRefersh" CommandName="refersh" runat="server" ImageUrl="../Content/Grid/grid_Refresh.gif"
                                    AlternateText="刷新列表" />
                            </td>
                        </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr class="<%# System.Convert.ToDateTime(Eval("ExpectEndDate")).CompareTo(System.Convert.ToDateTime(Eval("RegisterDate"))) >= 0? "data":"" %>" ondblclick="OpenEditRegister('<%#Eval("RegisterID") %>')" onclick="handleClick()" bgcolor='<%# System.Convert.ToDateTime(Eval("ExpectEndDate")).CompareTo(System.Convert.ToDateTime(Eval("RegisterDate"))) >= 0? "":"#DDAA00" %>' >
                    <td >
                        <asp:Label runat="server" ID="CustomerID" Text='<%#Eval("CustomerID") %>' Visible="false"></asp:Label>
                        <asp:Label runat="server" ID="CustomerName"></asp:Label>
                        <asp:Label runat="server" ID="RegisterID" Text='<%# Eval("RegisterID") %>' Visible="false"></asp:Label>
                    </td>
                    <td>
                        <asp:Label runat="server" ID="CustomerArea"></asp:Label>
                    </td>
                    <td>
                        <asp:Label runat="server" ID="IsSystemAssign" Text='<%# Eval("IsSystemAssign")%>' Visible="false"></asp:Label>
                        <asp:Label runat="server" ID="TaskType" Text='<%# Eval("TaskType")%>' Visible="false"></asp:Label>
                        <asp:Label runat="server" ID="TaskTypeName"></asp:Label>
                    </td>
                    <td>
                        <asp:Label runat="server" ID="TaskStatus" Visible="false" Text='<%# Eval("TaskStatus")%>'></asp:Label><asp:Label
                            runat="server" ID="TaskStatusName"></asp:Label>
                    </td>
                    <td>
                        <%# Eval("ExpectEndDate")%>
                    </td>
                    <td>
                        <asp:Label runat="server" ID="PerformPerson" Text='<%# Eval("PerformPerson")%>' Visible="false"></asp:Label>
                        <asp:Label runat="server" ID="PerformPersonName"></asp:Label>
                    </td>
                    <td>
                        <asp:Label runat="server" ID="Agent" Text='<%# Eval("Agent")%>' Visible="false"></asp:Label>
                        <asp:Label runat="server" ID="AgentName"></asp:Label>
                    </td>
                    <td>
                        <asp:Label runat="server" ID="CreatedBy" Text='<%# Eval("CreatedBy")%>' Visible="false"></asp:Label>
                        <asp:Label runat="server" ID="CreatedByName"></asp:Label>
                    </td>
                    <td>
                        <asp:Label runat="server" ID="Instrumentname"></asp:Label>
                    </td>
                    <td>
                        <asp:Label runat="server" ID="InstrumentID" Text='<%# Eval("InstrumentID")%>' Visible="false"></asp:Label>
                        <asp:Label runat="server" ID="InstrumentSerialNum" Text='<%# Eval("InstrumentSerialNum") %>' ToolTip='<%# Eval("InstrumentSerialNum") %>'></asp:Label>
                    </td>
                    <td>
                        <asp:HyperLink runat="server" ID="link1" Text="服务单录入" Target="_blank" NavigateUrl='<%# "MaintainBasic.aspx?RegisterID="+Eval("RegisterID") %>'></asp:HyperLink>
                        <asp:LinkButton ID="imgbtnComplete" CommandName="complete" runat="server" Visible='false'>完成工作</asp:LinkButton>
                        <%--<%# Eval("TaskStatus").ToString() == "0" %>--%>
                          <asp:LinkButton ID="ltnDel" CommandName="delete" runat="server" >删除</asp:LinkButton>
                    </td>
                    <td>
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                </tbody> </table>
            </FooterTemplate>
        </asp:Repeater>
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" CssClass="paginator" CurrentPageButtonClass="cpb"
            PageSize="15" CustomInfoHTML="第%CurrentPageIndex%页，共%PageCount%页，每页%PageSize%条"
            FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页" ShowCustomInfoSection="Left"
            Width="100%" LayoutType="Table" SubmitButtonClass="but" SubmitButtonText="转到"
            OnPageChanged="AspNetPager1_PageChanged">
        </webdiyer:AspNetPager>
    </div>
    <asp:Button ID="btnRefersh" runat="server" Text="Button" style="display:none" onclick="btnRefersh_Click" />
</asp:Content>
